package com.yonyou.pmclouds.enterprise.rmiitf;

import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.enterprise.entity.EnterpriseQueryParam;
import com.yonyou.pmclouds.enterprise.entity.EnterpriseVO;

import java.util.Map;

/**
 * @Author chulf
 * @Date 2020/4/13
 * @Description
 **/
public interface EnterpriseQuery {

    /**
     *  根据登录用户 返回不同的查询范围
     * @param param
     * @return
     * @throws BusinessException
     */
    EnterpriseVO[] queryEnterprisesByUser(EnterpriseQueryParam param) throws BusinessException;

    /**
     *
     * @param pkEnterprise
     * @return
     * @throws BusinessException
     *  查询企业详情（卡片页面）
     */
    EnterpriseVO queryEnterpriseDetail(String pkEnterprise) throws BusinessException;

    /**
     *
     * @param role
     * @return 通过角色参照租户下对应的企业
     * @throws BusinessException
     */

    EnterpriseVO[] queryEnterprisesByRole(byte role) throws BusinessException;

    EnterpriseVO[] queryByCondition(EnterpriseQueryParam param);

    Map<String, EnterpriseVO[]> queryByUserIds(String[] userIds) throws BusinessException;

    EnterpriseVO[] queryByIds(String[] pkEnterprises) throws BusinessException;
}
